package com.breaktian.demoapp.ui.refreshdemo;

import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;

import com.breaktian.demoapp.R;

public class MainActivity extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        findViewById(R.id.listview).setOnClickListener(this);
        findViewById(R.id.recyclerview).setOnClickListener(this);
        findViewById(R.id.nestedscrollview).setOnClickListener(this);
        findViewById(R.id.scrollview).setOnClickListener(this);
        findViewById(R.id.webview).setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        switch (v.getId()){
            case R.id.listview:
                startActivity(new Intent(this,ListViewRefreshActivity.class));
                break;
            case R.id.recyclerview:
                startActivity(new Intent(this,RecyclerActivity.class));
                break;
            case R.id.nestedscrollview:
                startActivity(new Intent(this,NestedScrollViewActivity.class));
                break;
            case R.id.scrollview:
                startActivity(new Intent(this,ScrollViewActivity.class));
                break;
            case R.id.webview:
                startActivity(new Intent(this,WebviewActivity.class));
                break;
        }
    }
}
